package com.santu.edu.supporter.biz.user.pojo.dto;

import com.santu.edu.supporter.biz.school.pojo.dto.SchoolDTO;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author luoyaoqi
 * @createTime 2024/5/10
 * @description
 */
@Data
@Accessors(chain = true)
public class UserInfoDTO {

    /**
     * 学校id
     */
    private SchoolDTO schoolDTO;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 推广码
     */
    private String invitationCode;


    /**
     * 用户令牌
     */
    private String token;

    public static UserInfoDTO createItem(UserDTO dto) {
       return new UserInfoDTO()
                .setUserId(dto.getUserId())
                .setUserName(dto.getUserName())
                .setPhone(dto.getPhone())
                .setAvatar(dto.getAvatar())
                .setInvitationCode(dto.getInvitationCode())
                .setToken(dto.getToken());
    }


}
